package com.wt.com.wt;

import com.wt.Pojo.User;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/userP")
public class ProviderController {
    @PostMapping
    public String Add(@RequestBody User user){
        System.out.println("providerAdd=="+user);
        return "ok ADD";
    }

    @DeleteMapping("/{id}")
    public String del(@PathVariable("id") Integer id){
        System.out.println("providerDel=="+id);
        return "ok Del";
    }

    @GetMapping
    public String Get(User user){
        System.out.println("------get------------");
        System.out.println("providerGet=="+user);
        return "ok Get";
    }

    @PutMapping
    public String Put(User user){
        System.out.println("providerPut=="+user);
        return "ok Put";
    }
}
